//
//  main.m
//  通知
//
//  Created by song on 15/1/15.
//  Copyright (c) 2015年 song. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Company.h"
#import "Person.h"

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        
        NSLog(@"-----------------");
        Company *tx =[[Company alloc]init];
        tx.name = @"腾讯";
        
        Company *sina = [[Company alloc]init];
        sina.name =@"新浪新闻";
        
        Person *zs =[[Person alloc]init];
        zs.name =@"zhangsan";
        
        Person *ls =[[Person alloc]init];
        ls.name =@"lisi";
        
        
        
        NSNotificationCenter *center =[NSNotificationCenter defaultCenter];
        [center addObserver:zs selector:@selector(companyNotification:) name:@"junshi_news_come" object:tx];
        [center postNotificationName:@"junshi_news_come" object:tx userInfo:@{@"title":@"hello tengxun", @"intro":@"good"}];
        [center postNotificationName:@"junshi_news_come" object:sina userInfo:@{@"title":@"hello sina", @"intro":@"good"}];
        
    
    }
    return 0;
}
